home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / Peon / PeonSDK-Win32-1.0.0.exe / {app} / PeonMain / include / al / alut.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-03-15  |  3.1 KB  |  102 lines

  1. #ifndef _ALUT_H_
  2. #define _ALUT_H_
  3.  
  4. /* define platform type */
  5. #if !defined(MACINTOSH_AL) && !defined(LINUX_AL) && !defined(WINDOWS_AL)
  6.   #ifdef __APPLE__
  7.     #define MACINTOSH_AL
  8.     #else
  9.     #ifdef _WIN32
  10.       #define WINDOWS_AL
  11.     #else
  12.       #define LINUX_AL
  13.     #endif
  14.   #endif
  15. #endif
  16.  
  17. #include "altypes.h"
  18. #include "aluttypes.h"
  19.  
  20. #ifdef _WIN32
  21. #define ALUTAPI
  22. #define ALUTAPIENTRY    __cdecl
  23. #define AL_CALLBACK
  24. #else  /* _WIN32 */
  25.  
  26. #ifdef TARGET_OS_MAC
  27. #if TARGET_OS_MAC
  28. #pragma export on
  29. #endif /* TARGET_OS_MAC */
  30. #endif /* TARGET_OS_MAC */
  31.  
  32. #ifndef ALUTAPI
  33. #define ALUTAPI
  34. #endif
  35.  
  36. #ifndef ALUTAPIENTRY
  37. #define ALUTAPIENTRY
  38. #endif
  39.  
  40. #ifndef AL_CALLBACK
  41. #define AL_CALLBACK
  42. #endif 
  43.  
  44. #endif /* _WIN32 */
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. #ifndef AL_NO_PROTOTYPES
  51.  
  52. ALUTAPI void ALUTAPIENTRY alutInit(int *argc, char *argv[]);
  53. ALUTAPI void ALUTAPIENTRY alutExit(ALvoid);
  54.  
  55. #ifdef LINUX_AL
  56. /* this function is Linux-specific and will probably be removed from this header */
  57. ALUTAPI ALboolean ALUTAPIENTRY alutLoadWAV( const char *fname, ALvoid **wave, ALsizei *format, ALsizei *size, ALsizei *bits, ALsizei *freq );
  58. #endif
  59.  
  60. #ifndef MACINTOSH_AL
  61. /* Windows and Linux versions have a loop parameter, Macintosh doesn't */
  62. ALUTAPI void ALUTAPIENTRY alutLoadWAVFile(ALbyte *file, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq, ALboolean *loop);
  63. ALUTAPI void ALUTAPIENTRY alutLoadWAVMemory(ALbyte *memory, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq, ALboolean *loop);
  64. #else
  65. ALUTAPI void ALUTAPIENTRY alutLoadWAVFile(ALbyte *file, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq);
  66. ALUTAPI void ALUTAPIENTRY alutLoadWAVMemory(ALbyte *memory, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq);
  67. #endif
  68. ALUTAPI void ALUTAPIENTRY alutUnloadWAV(ALenum format, ALvoid *data, ALsizei size, ALsizei freq);
  69.  
  70. #else
  71. ALUTAPI void      ALUTAPIENTRY (*alutInit)(int *argc, char *argv[]);
  72. ALUTAPI void       ALUTAPIENTRY (*alutExit)(ALvoid);
  73.  
  74. #ifdef LINUX_AL
  75. /* this function is Linux-specific and will probably be removed from this header */
  76. ALUTAPI ALboolean ALUTAPIENTRY (*alutLoadWAV)( const char *fname, ALvoid **wave, ALsizei *format, ALsizei *size, ALsizei *bits, ALsizei *freq );
  77. #endif
  78.  
  79. #ifndef MACINTOSH_AL
  80. ALUTAPI void      ALUTAPIENTRY (*alutLoadWAVFile(ALbyte *file,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop);
  81. ALUTAPI void      ALUTAPIENTRY (*alutLoadWAVMemory)(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop);
  82. #else
  83. ALUTAPI void      ALUTAPIENTRY (*alutLoadWAVFile(ALbyte *file,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq);
  84. ALUTAPI void      ALUTAPIENTRY (*alutLoadWAVMemory)(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq);
  85. #endif
  86. ALUTAPI void      ALUTAPIENTRY (*alutUnloadWAV)(ALenum format,ALvoid *data,ALsizei size,ALsizei freq);
  87.  
  88.  
  89. #endif /* AL_NO_PROTOTYPES */
  90.  
  91. #ifdef TARGET_OS_MAC
  92. #if TARGET_OS_MAC
  93. #pragma export off
  94. #endif /* TARGET_OS_MAC */
  95. #endif /* TARGET_OS_MAC */
  96.  
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif
  102.